<?php

use yii\db\Migration;
use yii\db\Schema;

class m161228_070709_add_column extends Migration
{
    public function up()
    {
         $this->addColumn('{{supplier}}', 'bank_account', Schema::TYPE_STRING. "(64) null COMMENT '银行账号' ");
         $this->addColumn('{{supplier}}', 'bank_name', Schema::TYPE_STRING. "(64) null COMMENT '银行名称' ");
         $this->addColumn('{{supplier}}', 'bank_account_name', Schema::TYPE_STRING. "(64) null COMMENT '账户名称' ");
         $this->addColumn('{{supplier}}', 'bank_address', Schema::TYPE_STRING. "(64) null COMMENT '开户行地址' ");
         $this->addColumn('{{supplier}}', 'remark', Schema::TYPE_STRING. "(255) null COMMENT '备注' ");


         $this->addColumn('{{member}}', 'gender', Schema::TYPE_INTEGER. "(1)  DEFAULT  '1' COMMENT '1 男 / 2 女' ");


         $this->addColumn('{{cruise}}', 'to_city', Schema::TYPE_INTEGER. "(2)  DEFAULT  '0' COMMENT '返回城市' ");
         $this->addColumn('{{cruise}}', 'code', Schema::TYPE_STRING. "(8)  null COMMENT '游轮简码' ");


         $this->addColumn('{{room}}', 'balcony', Schema::TYPE_INTEGER. "(1)  DEFAULT  '2' COMMENT '1 有阳台 2 无阳台' ");
         $this->addColumn('{{room}}', 'balcony_area', Schema::TYPE_INTEGER. "(4)  DEFAULT  '0' COMMENT '阳台面积' ");
    }

    public function down()
    {
        echo "m161228_070709_add_column cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
